﻿using System;
using System.Runtime.Serialization;

namespace Utility
{
    /// <summary>
    /// 初始化异常
    /// </summary>
    [Serializable]
    public class StartException : Exception
    {
        /// <summary>
        /// 导致异常的函数名
        /// </summary>
        public string Function { get; set; }

        public StartException()
        {
        }

        public StartException(string message,string function) : base(message)
        {
            Function = function;
        }

        public StartException(string message) : base(message)
        {
        }

        public StartException(string message, Exception innerException) : base(message, innerException)
        {
        }

        protected StartException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }
}
